// src/routes.js
import React from 'react';
import { Route, Routes, Navigate  } from 'react-router';
import Home from './pages/Home.js';
import Login from './pages/Login.js';
import Register from './pages/Register.js';

function AppRoutes() {
  return (
    <Routes>
      <Route path="/login" element={<Login/>}/>
      <Route path="/register" element={<Register/>}/>
      <Route path="/home" element={<Home/>}/>
      <Route path="*" element={<Navigate to="/home" />}/>
    </Routes>
  );
}

export default AppRoutes;
